package com.idp.web.entity;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

import com.idp.common.base.BaseEntity;
import com.idp.common.util.IdGen;
import com.idp.common.util.ResourceUtils;
import lombok.Data;

/**
 * 医院实体类
 * @author xubinren
 * @version 1.0
 * @date 2018/2/27
 */
@Data
public class Hospitals extends BaseEntity implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	/**主键id*/
	private String id;
	/**医院名称*/
	private String hospitalName;
	/**医院等级：三级甲等 二级甲等*/
	private String level;
	/**是否属于国外：1是，0否*/
	private Integer belongForeign;
	/**省id*/
	private String adderssProvinceId;
	/**市id*/
	private String adderssCityId;
	/**地址*/
	private String addressDetail;
	/**完整的地址*/
	private String completeAddress;
	/**简介*/
	private String introduction;
	/**图片url*/
	private String imageUrl;
	/**创建时间*/
	private Date createDate;
	/**最后更新时间*/
	private Date updateDate;
	/**是否删除：1是，0否*/
	private Integer logicDelete;
	/**createUser*/
	private String createUser;
	/**updateUser*/
	private String updateUser;

	/**
	 * 初始化公共属性
	 */
	public void preInsert(String userId) {
		setId(ResourceUtils.getUUID());
		this.logicDelete = 0;
		this.createDate = new Date();
		this.updateDate = this.createDate;
		this.createUser = userId;
		this.updateUser = userId;
	}
	/**
	 * 编辑
	 */
	public void preUpdate(String userId) {
		this.updateDate = new Date();
		this.updateUser = userId;
	}
}
